package com.sxran.im.handler;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.sxran.im.controller.ImController;
import com.sxran.im.dao.ImChatBodyMapper;
import com.sxran.im.dao.ImFriendMapper;
import com.sxran.im.dao.ImMsgExtrasMapper;
import com.sxran.im.info.ImChatBody;
import com.sxran.im.info.ImFriend;
import com.sxran.im.info.ImMsgExtras;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Slf4j
@Service
public class DeleteMessageCmdHandler extends AbstractCmdHandler<ImMsgExtras>{
    @Resource
    private ImMsgExtrasMapper imMsgExtrasMapper;

    @Override
    public Object doBeanService(ImMsgExtras json) {
        String curUserId = ImController.getCurUserId();
        json.setUserId(curUserId);
        json.setIsDelete( 1 );
        imMsgExtrasMapper.insert(json);
        // 删除对应的会话内容。
        return json;
    }



}
